var message = "Hello World";
console.log(message);
var num = 523;
console.log(num);
//面向对象编程实例
var Site = /** @class */ (function () {
    function Site() {
    }
    Site.prototype.name = function () {
        console.log("runoob");
    };
    return Site;
}());
var child1 = new Site(); //实例
child1.name();
//any类型 声明类型不确定的变量
var a = 1;
a = 'cyh';
a = true;
console.log(a);
var arr = [1, 2, "张三", true];
arr[4] = undefined;
console.log(arr, "arr");
//使用 | 来支持多种类型
var b;
b = null;
console.log(b);
//number string boolean
var x1 = 2;
var x2 = 'string';
var x3 = true;
console.log(x1, x2, x3);
//数组
var x4 = [1, 2];
var x5 = [1, 2, "11", true];
console.log(x4, x5);
//元组
var x6;
x6 = ["x6", false];
console.log(x6);
//枚举
var Color;
(function (Color) {
    Color[Color["small"] = 0] = "small";
    Color[Color["middle"] = 1] = "middle";
    Color[Color["big"] = 2] = "big";
})(Color || (Color = {}));
var x7 = Color.small;
console.log(x7);
//void
var F1 = /** @class */ (function () {
    function F1() {
    }
    F1.prototype.f = function () {
        console.log("f函数没有返回值");
    };
    F1.prototype.f2 = function (num) {
        console.log("f2函数返回值为number类型");
        return num;
    };
    return F1;
}());
var x8 = new F1().f();
var x9 = new F1().f2(500);
console.log(x9, "x9");
//null
var x10 = null;
//当未声明类型，则根据值得类型来推断类型
var x11 = 2;
console.log(x11, "x11");
// x11 = "zhangsan" //编译报错  因为x11已经是number类型了
//变量作用域
var x12 = 12; //全局变量
var x13Class = /** @class */ (function () {
    function x13Class() {
        this.x13 = 13; //实例变量
    }
    x13Class.prototype.sum = function () {
        var a = '局部变量'; //局部变量
        return a;
    };
    x13Class.val = 14; //静态变量
    return x13Class;
}());
var x14 = new x13Class().x13;
console.log("全局变量：", x12);
console.log("静态变量：", x13Class.val);
console.log("实例变量：", x14);
console.log("局部变量：", new x13Class().sum());
